load("//bazel:tachyon_cc.bzl", "tachyon_cc_library", "tachyon_cc_unittest")

package(default_visibility = ["//visibility:public"])

tachyon_cc_library(
    name = "bit_traits",
    hdrs = ["bit_traits.h"],
    deps = [
        ":gmp_util",
        "//tachyon/math/base:bit_traits_forward",
    ],
)

tachyon_cc_library(
    name = "gmp_util",
    srcs = ["gmp_util.cc"],
    hdrs = ["gmp_util.h"],
    deps = [
        "//tachyon/base:logging",
        "//tachyon/base/strings:string_util",
        "//tachyon/math/base:sign",
        "@com_google_absl//absl/base",
        "@local_config_gmp//:gmp",
    ],
)

tachyon_cc_library(
    name = "signed_value",
    hdrs = ["signed_value.h"],
    deps = [
        ":gmp_util",
        "//tachyon/math/base:sign",
    ],
)

tachyon_cc_unittest(
    name = "gmp_unittests",
    srcs = [
        "gmp_util_unittest.cc",
    ],
    deps = [
        ":gmp_util",
        "//tachyon/build:build_config",
    ],
)
